<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理</title>
    <!-- Base Style -->
    <link rel="stylesheet" href="__STATIC__/admin/css/style.css">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="__ADMINLTE__/plugins/fontawesome-free/css/all.min.css">
    <!-- Bootstrap Latest -->
    <link rel="stylesheet" href="https://unpkg.com/bootstrap@latest/dist/css/bootstrap.min.css">
    <!-- ElementUI 最新版 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script>
        const WEB_ADMIN_PATH = '{:url("/")}';
        const CONTROLLER = '{:$Think.const.CONTROLLER}';
    </script>
    <block name="head"></block>
</head>
<body>
    <!-- 总外围 -->
    <el-container class="wrapper min-vh-100" id="website">
        <!-- 主边栏容器 -->
        <el-aside width="250px" class="shadow bg-dark" :class="{'sidebar-collapse': isCollapse}">
            <block name="logo">
                <!-- 网站Logo -->
                <a href="{:url('index/index')}" class="navbar-brand bg-dark text-light border-bottom border-secondary w-100 mx-0 px-2 py-3">
                    <el-avatar src="__ADMINLTE__/dist/img/AdminLTELogo.png" size="medium" alt="TshirLeap Logo" class="mx-2 align-middle" style="opacity: .8">
                        <i class="el-icon-picture-outline-round"></i>
                    </el-avatar>
                    <span class="font-weight-light align-middle d-inline-block">{$Think.lang.SITE_NAME}</span>
                </a>
                <!-- /.网站Logo -->
            </block>
            <block name="menu">
                <!-- 边栏 -->
                <el-menu 
                    background-color="#343A40"
                    text-color="#c2c7d0"
                    active-text-color="#ffffff"
                    default-active="{:get_category_path($menu_data)}"
                    :collapse="isCollapse"
                    class="border-right-0"
                    unique-opened
                >
                    <foreach name="menu_data" item="menu" key="id">
                        <if condition="0 == $id">
                            <!-- 一级菜单 -->
                            <foreach name="menu" item="v" key="k">
                                <!-- 判断菜单状态，0：不显示 1：显示 -->
                                <if condition="0 != $v['status']">
                                    <!-- 判断是否有子菜单 -->
                                    <if condition="isset($menu_data[$k])">
                                        <el-submenu index="{$k}">
                                            <template slot="title">
                                                <i class="{$v['icon']}"></i>
                                                <span slot="title">{$v['name']}</span>
                                            </template>
                                            <!-- 二级菜单 -->
                                            <foreach name="menu_data[$k]" item="vv" key="kk">
                                                <!-- 判断菜单状态，0：不显示 1：显示 -->
                                                <if condition="0 != $vv['status']">
                                                    <!-- 判断是否有子菜单 -->
                                                    <if condition="isset($menu_data[$kk])">
                                                        <el-submenu index="{$k}-{$kk}">
                                                            <template slot="title">
                                                                <i class="{$vv['icon']}"></i>
                                                                <span slot="title">{$vv['name']}</span>
                                                            </template>
                                                        </el-submenu>
                                                    <else />
                                                        <el-menu-item index="{$k}-{$kk}">
                                                            <i class="{$vv['icon']}"></i>
                                                            <a href="{:url($vv['href'])}">{$vv['name']}</a>
                                                        </el-menu-item>
                                                    </if>
                                                </if>
                                            </foreach>
                                        </el-submenu>
                                    <else />
                                        <el-menu-item index="{$k}">
                                            <i class="{$v['icon']}"></i>
                                            <span slot="title">
                                                <a href="{:url($v['href'])}">{$v['name']}</a>
                                            </span>
                                        </el-menu-item>
                                    </if>
                                </if>
                            </foreach>
                        </if>
                    </foreach>
                </el-menu>
                <!-- /.边栏 -->
            </block>
        </el-aside>
        <!-- /.主边栏容器 -->
        <el-container>
            <el-header class="border-bottom" height="auto">
                <block name="navbar">
                    <!-- 导航栏 -->
                    <nav class="navbar navbar-expand navbar-light px-0">
                        <button @click="isCollapse = !isCollapse" class="pr-3 py-2 bg-transparent border-0 p-0" type="button"
                            aria-label="Toggle Menu">
                            <span class="el-icon-s-fold text-dark align-middle"></span>
                        </button>
                        <!-- 左导航栏链接 -->
                        <ul class="navbar-nav">
                            <li class="nav-item d-inline-block">
                                <a class="px-3 py-2 nav-link" href="{:url('index/index')}">
                                    <i class="fas fa-home"></i>
                                </a>
                            </li>
                        </ul>
                        <!-- /.左导航栏链接 -->

                        <!-- 右导航栏链接 -->
                        <el-dropdown trigger="click" class="ml-auto mr-3 user-menu">
                            <span class="el-dropdown-link">
                                <el-link type="info" :underline="false" class="text-decoration-none">
                                    <el-avatar src="{$avatar}" size="medium" class="align-middle shadow mr-1">
                                        <i class="el-icon-picture-outline-round"></i>
                                    </el-avatar>
                                    {:lang('WELCOME_USER', [$user_name])}
                                </el-link>
                            </span>
                            <!-- 用户设置 -->
                            <el-dropdown-menu slot="dropdown" class="p-0 border-0 profile-user">
                                <div class="card card-primary card-outline">
                                    <div class="card-body box-profile">
                                        <div class="text-center">
                                            <a href="{:url('admin/profile')}">
                                                <el-avatar src="{$avatar}" :size="100" class="profile-user-img p-1 bg-transparent">
                                                    <i class="el-icon-picture-outline-round"></i>
                                                </el-avatar>
                                            </a>
                                        </div>
                                        <h5 class="profile-username text-center mt-1">{$user_name}</h5>
                                        <p class="text-muted text-center"></p>
                                        <ul class="list-group list-group-unbordered mb-3 border-bottom">
                                            <li class="list-group-item border-left-0 border-right-0 border-bottom-0 text-center">
                                                <a href="{:url('admin/profile')}" class="text-secondary text-decoration-none">
                                                    {$Think.lang.USER_SETTINGS}
                                                </a>
                                            </li>
                                        </ul>
                                        <a href="{:url('index/logout')}" class="btn btn-primary btn-block">{$Think.lang.LOG_OUT}</a>
                                    </div>
                                </div>
                            </el-dropdown-menu>
                            <!-- /.用户设置 -->
                        </el-dropdown>
                        <!-- /.右导航栏链接 -->
                    </nav>
                    <!-- /.导航栏 -->
                </block>
            </el-header>
            <!-- 主内容区外围 -->
            <el-main class="bg-light">
                <block name="content-header">
                    <el-page-header @back="goBack" content="{$breadcrumb.title}" class="pb-4"></el-page-header>
                </block>
                <div class="container-fluid px-0">
                    <block name="main-content">主内容区</block>
                </div>
            </el-main>
            <!-- /.主内容区外围 -->
            <el-footer class="border-top p-3">
                <block name="footer">
                    <div class="float-right d-none d-sm-block">
                        <b>Version</b> 3.0.2-pre
                    </div>
                    <strong>Copyright &copy; 2014-2019 <a href="http://adminlte.io">AdminLTE.io</a>.</strong> All rights reserved.
                </block>
            </el-footer>
        </el-container>
    </el-container>
    <!-- /.总外围 -->
    <block name="footer-script">
        <!-- jQuery -->
        <script src="https://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
        <script>window.jQuery || document.write('<script src="__ADMINLTE__/plugins/jquery/jquery.min.js"><\/script>')</script>
        <!-- Bootstrap Latest -->
        <script src="https://unpkg.com/bootstrap@latest/dist/js/bootstrap.min.js"></script>
        <!-- Vue 开发环境版本，包含了有帮助的命令行警告 -->
        <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
        <!-- ElementUI 最新版 -->
        <script src="https://unpkg.com/element-ui/lib/index.js"></script>
        <!-- axios(类似Ajax) -->
        <js href="https://unpkg.com/axios@latest/dist/axios.min.js" />
        <!-- Vue-Axios 最新版 -->
        <script src="https://unpkg.com/vue-axios@latest/dist/vue-axios.min.js"></script>
        <!-- App JS -->
        <script src="__STATIC__/js/app.js"></script>
    </block>
</body>
</html>